package mapper;

import entity.User;

import java.util.List;

public interface UserMapper {
    /**
     * 对用户类的增,删,改,查
     * 1.增加:
     *      增加用户, parameter: User, result: int
     * 2.删除:
     *      删除用户, parameter: int(uid), result: int
     * 3.修改:
     *      修改用户, parameter: User, result: int
     * 4.查询:
     *      - 查询单个用户: parameter: int(uid), result: User
     *      - 查询用户uid: parameter: String(username), result: int(uid)
     *      - 查询所有User: result: List<User>
     *      - 查询当前注册用户数量, result:int
     */
    int addUser(User user);
    int deleteUser(int uid);
    int updateUser(User user);
    User queryUser(int uid);
    int queryUserUid(String username);
    List<User> queryAllUser();
    int getUserCount();
}
